package com.ruoyi.project.system.domain;

import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.Data;

@Data
public class DtRisk extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private Integer id;

    private String name;

    private String cardNo;

    private String tel;

    private String type;

    private String labels;

    private String delFlag;

    public DtRisk() {
    }

    public DtRisk(DtQuery dql) {
        this.name = dql.getName();
        this.cardNo = dql.getCardNo().substring(6);
//        this.tel = dql.getTel().substring(3);
    }

    public DtRisk(DtQuery dql, String type, String labels) {

        this.name = StringUtils.isEmpty(dql.getName()) ? "" : dql.getName();
        this.cardNo = StringUtils.isEmpty(dql.getCardNo()) ? "" : "*" + dql.getCardNo().substring(6);
        this.tel = StringUtils.isEmpty(dql.getTel()) ? "" : "*" + dql.getTel().substring(3);
        this.type = type;
        this.labels = labels;
    }
}
